﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Security.Principal;

namespace MDP.WebOpenPortal.Controllers.SSO
{
    public class ClaimsPrincipal : IClaimsPrincipal
    {
        #region 私有变量
        private IClaimsIdentity _identity;
        #endregion

        #region 公共属性
        /// <summary>
        /// 用户基本信息
        /// </summary>
        public IClaimsIdentity Identity
        {
            get { return this._identity; }
        }
        /// <summary>
        /// 用户基本信息
        /// </summary>
        IIdentity IPrincipal.Identity
        {
            get { return this._identity; }
        }
        /// <summary>
        /// 当前客户端代理的唯一标识符
        /// </summary>
        public string SystemCode
        {
            get;
            set;
        }
        /// <summary>
        /// 当前客户端代理的随机数
        /// </summary>
        public string ChallengeNumer
        {
            get;
            set;
        }
        /// <summary>
        /// 客户端的时间
        /// </summary>
        public DateTime ClientDate
        {
            get;
            set;
        }

        #endregion

        #region 构造函数
        public ClaimsPrincipal(IClaimsIdentity identity)
        {
            this._identity = identity;
        }
        #endregion


        #region 公共函数
        public bool IsInRole(string role)
        {
            throw new NotImplementedException();
        }

        #endregion

    }
}